import { getRightList, getSystemMenu, saveMenuRight } from '@/services/settings/menu/menuRightService';

export default {
  namespace: 'menuRightModel',

  state: {},

  effects: {
    *getRightList({ payload, callback }, { call, put }) {
      const response = yield call(getRightList, payload);
      if(callback) callback(response);
    },
    *getSysMenu({ payload, callback }, { call, put }) {
      const response = yield call(getSystemMenu, payload);
      if(callback) callback(response);
    },
    *saveMenuRight({ payload, callback }, { call, put }) {
      const response = yield call(saveMenuRight, payload);
      if(callback) callback(response);
    },
  },

  reducers: {
  },
};
